package com.xoa.service.crm;

import com.xoa.model.crm.Product;
import com.xoa.util.ToJson;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * Created by caoyin on 2019/5/29.
 */
public interface ProductService {

    // 查询所有(不带参数)[导出功能接口]
    public List<Product> selectAll();

    // 模糊查询及分页
    public List<Product> selectByCondition(Integer page, Integer pageSize, Boolean useFlag, Map map);

    // 根据主键id进行删除(逻辑删除)
    public int deleteByPrimaryKey(Integer productId);

    // 添加产品数据
    public int insertProduct(Product product);

    // 插入全部的数据
    public int insertSelective(Product product);

    // 查询所有的数据[crm_product]
    List<Product> selectByAll(Integer page, Integer pageSize, Boolean useFlag, Map map);

    // 数据回显接口
    public Product selectByPrimaryKey(Integer productId);

    // 更新数据(根据产品id)
    public int updateByPrimaryKeySelective(Product product);

    // 产品信息表导出功能
    public ToJson<Product> queryExportProduct(HttpServletRequest request, HttpServletResponse response, Product product, String beginDate, String isExport);

    // 产品信息表导入功能
    public ToJson<Product> queryImportProduct(HttpServletRequest request, HttpServletResponse response, MultipartFile file);


    List<Product> selectProduct();
}
